<?php
namespace app\validate;

use think\Validate;

class CheckTopicType extends Validate
{
    protected $rule =   [
        'name'  => 'require|length:2,30',
        'e_name'  => 'require|length:2,50',
        'role'  => 'require',
    ];

    protected $message  =   [
        'name.require' => '请输入类型名称！',
        'name.length' => '类型名称在2-30个字符！',
        'e_name.require' => '请输入英文名称！',
        'e_name.length' => '英文名称在2-50个字符！',
        'role.require' => '请选择权限！',
    ];

}